// ****************************************************************************** 
// Copyright     :  Copyright (C) 2018, Hisilicon Technologies Co. Ltd.
// File name     :  hipciec_nvme_global_reg_c_union_define.h
// Project line  :  Platform And Key Technologies Development
// Department    :  CAD Development Department
// Author        :  xxx
// Version       :  1.0
// Date          :  2017/10/24
// Description   :  The description of xxx project
// Others        :  Generated automatically by nManager V4.2 
// History       :  xxx 2018/03/16 18:02:53 Create file
// ******************************************************************************

#ifndef __HIPCIEC_NVME_GLOBAL_REG_C_UNION_DEFINE_H__
#define __HIPCIEC_NVME_GLOBAL_REG_C_UNION_DEFINE_H__

/* Define the union U_NVME_CTRL_MISC */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_0        : 30  ; /* [31:2] */
        unsigned int    int_coal_en  : 1  ; /* [1] */
        unsigned int    ro_reg_wr_en : 1  ; /* [0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_NVME_CTRL_MISC;

/* Define the union U_SRIOV_MODE_CTRL */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_1          : 29  ; /* [31:3] */
        unsigned int    sriov_mode_sel : 3  ; /* [2:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_SRIOV_MODE_CTRL;

/* Define the union U_PF0_BAR0_DB_ATU_LOW */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_bar0_db_atu_low : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_BAR0_DB_ATU_LOW;

/* Define the union U_PF0_BAR0_DB_ATU_HIGH */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_bar0_db_atu_high : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_BAR0_DB_ATU_HIGH;

/* Define the union U_PF2_VF_BAR0_DB_ATU_LOW */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf2_vf_bar0_db_atu_low : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF2_VF_BAR0_DB_ATU_LOW;

/* Define the union U_PF2_VF_BAR0_DB_ATU_HIGH */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf2_vf_bar0_db_atu_high : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF2_VF_BAR0_DB_ATU_HIGH;

/* Define the union U_PF3_BAR0_DB_ATU_LOW */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_bar0_db_atu_low : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_BAR0_DB_ATU_LOW;

/* Define the union U_PF3_BAR0_DB_ATU_HIGH */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_bar0_db_atu_high : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_BAR0_DB_ATU_HIGH;

/* Define the union U_PF3_VF_BAR0_DB_ATU_LOW */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_vf_bar0_db_atu_low : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_VF_BAR0_DB_ATU_LOW;

/* Define the union U_PF3_VF_BAR0_DB_ATU_HIGH */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_vf_bar0_db_atu_high : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_VF_BAR0_DB_ATU_HIGH;

/* Define the union U_INT_COAL_TIME_CNT_UNIT */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    rsv_2         : 16  ; /* [31:16] */
        unsigned int    time_cnt_unit : 16  ; /* [15:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_INT_COAL_TIME_CNT_UNIT;

/* Define the union U_PF0_DB_INT_MASK0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_mask0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_MASK0;

/* Define the union U_PF0_DB_INT_MASK1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_mask1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_MASK1;

/* Define the union U_PF0_DB_INT_MASK2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_mask2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_MASK2;

/* Define the union U_PF0_DB_INT_MASK3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_mask3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_MASK3;

/* Define the union U_PF0_DB_INT_PENDING0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_pending0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_PENDING0;

/* Define the union U_PF0_DB_INT_PENDING1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_pending1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_PENDING1;

/* Define the union U_PF0_DB_INT_PENDING2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_pending2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_PENDING2;

/* Define the union U_PF0_DB_INT_PENDING3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf0_db_int_pending3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF0_DB_INT_PENDING3;

/* Define the union U_PF3_DB_INT_MASK0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_mask0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_MASK0;

/* Define the union U_PF3_DB_INT_MASK1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_mask1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_MASK1;

/* Define the union U_PF3_DB_INT_MASK2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_mask2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_MASK2;

/* Define the union U_PF3_DB_INT_MASK3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_mask3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_MASK3;

/* Define the union U_PF3_DB_INT_PENDING0 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_pending0 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_PENDING0;

/* Define the union U_PF3_DB_INT_PENDING1 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_pending1 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_PENDING1;

/* Define the union U_PF3_DB_INT_PENDING2 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_pending2 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_PENDING2;

/* Define the union U_PF3_DB_INT_PENDING3 */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_db_int_pending3 : 32  ; /* [31:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_PF3_DB_INT_PENDING3;

/* Define the union U_DB_INT_COAL_CFG */
typedef union
{
    /* Define the struct bits */
    struct
    {
        unsigned int    pf3_cfg_int_aggre_time : 8  ; /* [31:24] */
        unsigned int    pf3_cfg_int_aggre_thr  : 8  ; /* [23:16] */
        unsigned int    pf0_cfg_int_aggre_time : 8  ; /* [15:8] */
        unsigned int    pf0_cfg_int_aggre_thr  : 8  ; /* [7:0] */
    } bits;

    /* Define an unsigned member */
    unsigned int    u32;

} U_DB_INT_COAL_CFG;


//==============================================================================
/* Define the global struct */
typedef struct
{
    volatile U_NVME_CTRL_MISC          NVME_CTRL_MISC          ; /* 0 */
    volatile U_SRIOV_MODE_CTRL         SRIOV_MODE_CTRL         ; /* 4 */
    volatile U_PF0_BAR0_DB_ATU_LOW     PF0_BAR0_DB_ATU_LOW     ; /* 8 */
    volatile U_PF0_BAR0_DB_ATU_HIGH    PF0_BAR0_DB_ATU_HIGH    ; /* C */
    volatile U_PF2_VF_BAR0_DB_ATU_LOW  PF2_VF_BAR0_DB_ATU_LOW  ; /* 10 */
    volatile U_PF2_VF_BAR0_DB_ATU_HIGH PF2_VF_BAR0_DB_ATU_HIGH ; /* 14 */
    volatile U_PF3_BAR0_DB_ATU_LOW     PF3_BAR0_DB_ATU_LOW     ; /* 18 */
    volatile U_PF3_BAR0_DB_ATU_HIGH    PF3_BAR0_DB_ATU_HIGH    ; /* 1C */
    volatile U_PF3_VF_BAR0_DB_ATU_LOW  PF3_VF_BAR0_DB_ATU_LOW  ; /* 20 */
    volatile U_PF3_VF_BAR0_DB_ATU_HIGH PF3_VF_BAR0_DB_ATU_HIGH ; /* 24 */
    volatile U_INT_COAL_TIME_CNT_UNIT  INT_COAL_TIME_CNT_UNIT  ; /* 28 */
    volatile U_PF0_DB_INT_MASK0        PF0_DB_INT_MASK0        ; /* 2C */
    volatile U_PF0_DB_INT_MASK1        PF0_DB_INT_MASK1        ; /* 30 */
    volatile U_PF0_DB_INT_MASK2        PF0_DB_INT_MASK2        ; /* 34 */
    volatile U_PF0_DB_INT_MASK3        PF0_DB_INT_MASK3        ; /* 38 */
    volatile U_PF0_DB_INT_PENDING0     PF0_DB_INT_PENDING0     ; /* 3C */
    volatile U_PF0_DB_INT_PENDING1     PF0_DB_INT_PENDING1     ; /* 40 */
    volatile U_PF0_DB_INT_PENDING2     PF0_DB_INT_PENDING2     ; /* 44 */
    volatile U_PF0_DB_INT_PENDING3     PF0_DB_INT_PENDING3     ; /* 48 */
    volatile U_PF3_DB_INT_MASK0        PF3_DB_INT_MASK0        ; /* 4C */
    volatile U_PF3_DB_INT_MASK1        PF3_DB_INT_MASK1        ; /* 50 */
    volatile U_PF3_DB_INT_MASK2        PF3_DB_INT_MASK2        ; /* 54 */
    volatile U_PF3_DB_INT_MASK3        PF3_DB_INT_MASK3        ; /* 58 */
    volatile U_PF3_DB_INT_PENDING0     PF3_DB_INT_PENDING0     ; /* 5C */
    volatile U_PF3_DB_INT_PENDING1     PF3_DB_INT_PENDING1     ; /* 60 */
    volatile U_PF3_DB_INT_PENDING2     PF3_DB_INT_PENDING2     ; /* 64 */
    volatile U_PF3_DB_INT_PENDING3     PF3_DB_INT_PENDING3     ; /* 68 */
    volatile U_DB_INT_COAL_CFG         DB_INT_COAL_CFG         ; /* 6C */

} S_hipciec_nvme_global_reg_REGS_TYPE;

/* Declare the struct pointor of the module hipciec_nvme_global_reg */
extern volatile S_hipciec_nvme_global_reg_REGS_TYPE *gophipciec_nvme_global_regAllReg;

/* Declare the functions that set the member value */
int iSetNVME_CTRL_MISC_int_coal_en(unsigned int uint_coal_en);
int iSetNVME_CTRL_MISC_ro_reg_wr_en(unsigned int uro_reg_wr_en);
int iSetSRIOV_MODE_CTRL_sriov_mode_sel(unsigned int usriov_mode_sel);
int iSetPF0_BAR0_DB_ATU_LOW_pf0_bar0_db_atu_low(unsigned int upf0_bar0_db_atu_low);
int iSetPF0_BAR0_DB_ATU_HIGH_pf0_bar0_db_atu_high(unsigned int upf0_bar0_db_atu_high);
int iSetPF2_VF_BAR0_DB_ATU_LOW_pf2_vf_bar0_db_atu_low(unsigned int upf2_vf_bar0_db_atu_low);
int iSetPF2_VF_BAR0_DB_ATU_HIGH_pf2_vf_bar0_db_atu_high(unsigned int upf2_vf_bar0_db_atu_high);
int iSetPF3_BAR0_DB_ATU_LOW_pf3_bar0_db_atu_low(unsigned int upf3_bar0_db_atu_low);
int iSetPF3_BAR0_DB_ATU_HIGH_pf3_bar0_db_atu_high(unsigned int upf3_bar0_db_atu_high);
int iSetPF3_VF_BAR0_DB_ATU_LOW_pf3_vf_bar0_db_atu_low(unsigned int upf3_vf_bar0_db_atu_low);
int iSetPF3_VF_BAR0_DB_ATU_HIGH_pf3_vf_bar0_db_atu_high(unsigned int upf3_vf_bar0_db_atu_high);
int iSetINT_COAL_TIME_CNT_UNIT_time_cnt_unit(unsigned int utime_cnt_unit);
int iSetPF0_DB_INT_MASK0_pf0_db_int_mask0(unsigned int upf0_db_int_mask0);
int iSetPF0_DB_INT_MASK1_pf0_db_int_mask1(unsigned int upf0_db_int_mask1);
int iSetPF0_DB_INT_MASK2_pf0_db_int_mask2(unsigned int upf0_db_int_mask2);
int iSetPF0_DB_INT_MASK3_pf0_db_int_mask3(unsigned int upf0_db_int_mask3);
int iSetPF0_DB_INT_PENDING0_pf0_db_int_pending0(unsigned int upf0_db_int_pending0);
int iSetPF0_DB_INT_PENDING1_pf0_db_int_pending1(unsigned int upf0_db_int_pending1);
int iSetPF0_DB_INT_PENDING2_pf0_db_int_pending2(unsigned int upf0_db_int_pending2);
int iSetPF0_DB_INT_PENDING3_pf0_db_int_pending3(unsigned int upf0_db_int_pending3);
int iSetPF3_DB_INT_MASK0_pf3_db_int_mask0(unsigned int upf3_db_int_mask0);
int iSetPF3_DB_INT_MASK1_pf3_db_int_mask1(unsigned int upf3_db_int_mask1);
int iSetPF3_DB_INT_MASK2_pf3_db_int_mask2(unsigned int upf3_db_int_mask2);
int iSetPF3_DB_INT_MASK3_pf3_db_int_mask3(unsigned int upf3_db_int_mask3);
int iSetPF3_DB_INT_PENDING0_pf3_db_int_pending0(unsigned int upf3_db_int_pending0);
int iSetPF3_DB_INT_PENDING1_pf3_db_int_pending1(unsigned int upf3_db_int_pending1);
int iSetPF3_DB_INT_PENDING2_pf3_db_int_pending2(unsigned int upf3_db_int_pending2);
int iSetPF3_DB_INT_PENDING3_pf3_db_int_pending3(unsigned int upf3_db_int_pending3);
int iSetDB_INT_COAL_CFG_pf3_cfg_int_aggre_time(unsigned int upf3_cfg_int_aggre_time);
int iSetDB_INT_COAL_CFG_pf3_cfg_int_aggre_thr(unsigned int upf3_cfg_int_aggre_thr);
int iSetDB_INT_COAL_CFG_pf0_cfg_int_aggre_time(unsigned int upf0_cfg_int_aggre_time);
int iSetDB_INT_COAL_CFG_pf0_cfg_int_aggre_thr(unsigned int upf0_cfg_int_aggre_thr);

#endif // __HIPCIEC_NVME_GLOBAL_REG_C_UNION_DEFINE_H__
